﻿// copyright jyz.2024

#pragma once

#include "CoreMinimal.h"
#include "AuraWidgetController.h"
#include "AbilitySystem/Data/AuraAttributeInfo.h"
#include "AttributeMenuWidgetController.generated.h"


DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAttributeInfoSignature, const FAuraAttributeInfoData&, Info);

UCLASS()
class AURARPGDEMO_API UAttributeMenuWidgetController : public UAuraWidgetController
{
	GENERATED_BODY()
public:
	virtual void BroadcastInitialValues()override;

	UPROPERTY(BlueprintAssignable,Category="GAS|Attributes")
	FOnAttributeInfoSignature AttributeInfoDelegate;
protected:
	UPROPERTY(EditDefaultsOnly)
	TObjectPtr<UAuraAttributeInfo> AttributeInfo;

private:
	void BroadCastAttributeInfo(const FGameplayTag& GameplayTag,float Value)const;
};
